package com.yht.weblog.web.controller;

import com.yht.weblog.common.aspect.ApiOperationLog;
import com.yht.weblog.common.utils.Response;
import com.yht.weblog.web.model.vo.archive.FindArchiveArticlePageListReqVO;
import com.yht.weblog.web.service.ArchiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: yht
 * @date: 2024/1/21 10:23
 * @description:
 **/
@RestController
@Api(tags = "文章归档")
public class ArchiveController {

    @Autowired
    private ArchiveService archiveService;

    /**
     * 前台获取归档文章列表
     *
     * @return
     */
    @PostMapping ("/archive/list")
    @ApiOperation(value = "前台获取归档文章列表")
    @ApiOperationLog(description = "前台获取归档文章列表")
    public Response findArchiveArticlePageList(@RequestBody @Validated FindArchiveArticlePageListReqVO findArchiveArticlePageListReqVO) {
        return archiveService.findArchiveArticlePageList(findArchiveArticlePageListReqVO);
    }
}
